The present invention generally relates to a storage system and a method for preventing deterioration of write performance in a storage system using an electrically rewritable nonvolatile memory, and in particular relates to a storage system that uses a flash memory as the nonvolatile memory and a cache memory as the random access memory that is faster than the flash memory and which uses the cache memory in substitute for a defective flash memory block.
A flash memory is a nonvolatile memory that cannot be overwritten directly. Thus, in order to rewrite data, it is necessary to erase an erasure unit (block) configured from a plurality of write units (pages), and restore such pages to an unwritten state.
Therefore, with a standard storage system that uses a flash memory as its primary memory medium, when the host system does not update the stored data, it writes and validates new data in a backup extent that has been previously allocated to a part of the flash memory on the one hand, invalidates old data on the other hand, and thereafter erases the block containing the old data to make it a new backup extent. Incidentally, when there is other valid data remaining in the block to be erased, such valid data must be saved in an unwritten page of a different block prior to the foregoing erasure.
Generally speaking, the backup extent in the flash memory is also used as a substitute extent when another block becomes defective. Since a block of a flash memory is only guaranteed a write cycle of roughly 100,000 times, defective blocks will be generated on a daily basis if the host system repeatedly updates the stored data of the storage system, and the number of defective blocks will increase gradually. In addition, when the number of defective blocks increases to a point of filling the backup extent, it will become difficult to perform the foregoing stored data update control, and the storage system will become incapable of rewriting.
U.S. Pat. No. 5,936,971 describes a method of prolonging the rewriting lifespan of a data file storage system using a flash memory as the memory medium based on the following procedures using a cache memory: (1) Temporarily storing a flash memory data file from a host system in a cache memory capable of tolerating write/erasure cycles in a number that is significantly greater than a flash memory; (2) Writing a new data file in the cache memory in substitute for the flash memory according to a write request from the host system; (3) Storing in a tag memory the time from the last time the identifier of the data file and the respective data files were stored in the cache memory; and (4) When it is necessary to create additional space in the cache memory for a new data file, preferentially migrating the data file, in which the longest time has lapsed from the last writing by referring to the tag memory, from the cache memory to the flash memory. As a result of performing the processing described in (1) to (4) above, it is possible to significantly reduce the actual number of write counts and related stress in the flash memory.